package com.mlog.njyjy.ndop.persistence.dao;

import com.mlog.njyjy.ndop.common.domain.ContactPerson;
import com.mlog.njyjy.ndop.share.sql.dao.BaseSqlRepository;
import com.mlog.njyjy.ndop.share.sql.support.SqlTableUtil;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/9/10
 */
@Repository
public class ContactPersonRepository extends BaseSqlRepository<ContactPerson> {

    public ContactPerson findByName(String name) {
        return findFirst("select * from " + SqlTableUtil.getTblName(ContactPerson.class) + " where display_name = '" + name + "'");
    }
}
